import {defHttp} from '/@/utils/http/axios';

enum Api {
  list = '/auditCenter/caishuiBill/list',
  importExcel = '/auditCenter/caishuiBill/importExcel',
  exportXls = '/auditCenter/caishuiBill/exportXls',
  statusOne = '/auditCenter/caishuiBill/statusOne',
  updateBill = '/auditCenter/caishuiBill/updateBill',
}

/**
 * 导出api
 * @param params
 */
export const getExportUrl = Api.exportXls;

/**
 * 导入api
 */
export const getImportUrl = Api.importExcel;

/**
 * 列表接口
 * @param params
 */
export const list = (params) => defHttp.get({ url: Api.list, params });

/**
 * 开票审核
 * @param params
 * @param handleSuccess
 */
export const statusOne = (params) => {
  return defHttp.get({url: Api.statusOne, params}, {isTransformResponse:false});
}

/**
 * 上传票据
 * @param params
 */
export const updateBill = (params) => {
  return defHttp.post({url: Api.updateBill, params}, {isTransformResponse:false});
}
